package users;

import java.util.List;

/** 
 * The Author class is modeled after the functions and responsibilities
 * that a Author will have. An Author can submit a manuscript to any conference 
 * of his/her choice. Author can modify or delete the manuscripts that he/she submitted. 
 * 
 * @author Aaron Chen
 * @version 2014/03/08
 */
public class Author extends AbstractRole {
  
  /** The ID that this role is represented by. */
  public static final int ROLE_ID = 3;
  
  /** The name of the role. */
  public static final String ROLE_NAME = "Author";

 /** The list of manuscripts that the Author has submitted to the
  * conference. 
  */
  private List<Long> my_manuscripts;
  

  /**
   * Constructs a new Author role with minimal information.
   * @param the_conference_id The conference that this role belongs to.
   */
  public Author(final long the_conference_id) {
    super(0, 0, the_conference_id);
  } 
  
  /**
   * Constructs a new Author role.
   * @param the_role_id The ID for this particular role assignment.
   * @param the_user The user that this role belongs to.
   * @param the_conference_id The conference that this role belongs to.
   * @param the_manu_ids The list of manuscript IDs.
   */
  public Author(final long the_role_id,
                final User the_user,
                final long the_conference_id,
                final List<Long> the_manu_ids) {
    super(the_role_id, the_user.getID(), the_conference_id);
    my_manuscripts = the_manu_ids;
  }
  
  /**
   * Constructs a new Author role.
   * @param the_role_id The ID for this particular role assignment.
   * @param the_user_id The user that this role belongs to.
   * @param the_conference_id The conference that this role belongs to.
   * @param the_manu_ids The list of manuscript IDs.
   */
  public Author(final long the_role_id,
                final long the_user_id,
                final long the_conference_id,
                final List<Long> the_manu_ids) {
    super(the_role_id, the_user_id, the_conference_id);
    my_manuscripts = the_manu_ids;
  }
  
  
  /** 
   * Returns the manuscripts.
   * 
   * @return List my_manuscripts
   */
  public List<Long> getManuscripts() {
    return my_manuscripts;
  }

  /**
   * {@inheritDoc}
   */
  public int getRoleID() {
    return ROLE_ID;
  }

  /**
   * {@inheritDoc}
   */
  public String getRoleName() {
    return ROLE_NAME;
  }
  
  /**
   * {@inheritDoc}
   */
  @Override
  public String toString() {
    return ROLE_NAME;
  }

}
